summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosscreen.h
Commit message (Collapse)AuthorAgeFilesLines
* iOS: Implement support for QScreen::grabWindow()Tor Arne Vestbø2016-09-181-0/+2
| | | | | | | | | | | | | | | | Only windows that are part of the application can be grabbed. This excludes the system statusbar and other system overlays, as well as windows of other applications. This is a limitation due to the security model of iOS. There exists APIs to grab a snapshot of the complete screen, but these APIs return a view that can be used as a placeholder e.g. during view transformations, and doesn't match our API that require reading of pixels. Task-number: QTBUG-49944 Change-Id: I8fd5b4c2777be1486f0ff22762d5e9b64c927e70 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-201-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | And blacklisted a few tests in tst_QUdpSocket. Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtNative.java src/corelib/global/qglobal.cpp src/corelib/global/qsystemdetection.h src/corelib/io/qfileselector.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp tests/auto/network/socket/qudpsocket/BLACKLIST Task-number: QTBUG-54205 Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
| * uikit: Deliver update requests via CADisplayLink callbackTor Arne Vestbø2016-06-171-0/+5
| | | | | | | | | | | | | | | | Improves performance over the default timer-implementation, and allows us to control the rate and paused state of the display link. Change-Id: I05761b6eb48f5e91af35735e2faa477427cd8440 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| * iOS: Report correct physicalSize and physicalDotsPerInch for iPhone6+Tor Arne Vestbø2016-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | On iPhone 6(s) Plus devices, or when display zoom is enabled in an iPhone 6, the render buffer is scaled before being output on the physical display. We have to take this into account when computing the physical size. Task-number: QTBUG-50941 Change-Id: I318f3a866d039fccf0ba08f381fc9d8bcd676acd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* iOS: Update pixel density (PPI) logic to detect new iOS devicesTor Arne Vestbø2015-11-191-1/+1
| | | | | | | | | | | Since the iPhone 6(S) Plus devices have a PPI of 401, we change the logic from storing the unscaled PPI to storing the scaled PPI, and applying that to a scaled geometry when computing the physical size. Task-number: QTBUG-49467 Change-Id: I1741ff075749a301d2434cd35f642fcc9ea4b581 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: add missing Q_DECL_OVERRIDERichard Moe Gustavsen2015-07-271-10/+10
| | | | | | | Add missing Q_DECL_OVERRIDE to silence clang. Change-Id: I57261a39f0dcf4e0ffd8d9c079a95f2d3347d34a Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* iOS: Simplify view management in QIOSKeyboardListenerTor Arne Vestbø2014-12-021-0/+1
| | | | | | | | | | | | | We don't need to keep track of the view-controller or add ourselves as a gesture recognizer inside QIOSKeyboardListener. In fact, leaving the call to removeGestureRecognizer in [QIOSKeyboardListener dealloc] will result in QIOSKeyboardListener never being released, as the view that we add the recognizer to will keep a strong reference to the recognizer, so dealloc is never called unless the view is also released, which is unlikely to happen. We now fully control the lifetime of the recognizer. Change-Id: I6755e8cdfcc8f1062314db51aa54a2b7ecd1b967 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* iOS: Move statusbar visibility handling to QIOSViewControllerTor Arne Vestbø2014-10-021-3/+0
| | | | | | | | | | | | | It doesn't belong in QIOScreen, and simplifies the flow when changing the focus window or the window state of the focus window. Both will result in calling updateProperties on the view-controller, which will re-configure the statusbar visibility and hide/show it as appropriate, before triggering a re-layout of its own view, which will in turn trigger an update of the screen properties based on the new statusbar state, before re-layouting of QWindow based on the new screen state. Change-Id: I89077a3fb5f843949ce833e4e727d2c753ea2eb6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* iOS: Move top level window management out of QIOSScreen to ↵Tor Arne Vestbø2014-09-241-1/+0
| | | | | | | | | | | | | | | | QIOSDesktopManagerView The logic of how to deal with top level windows in the presence of rotation or status bar changes should be confined to our custom QIOSViewController that acts as a desktop manager for regular Qt applications. We no longer treat windows with full-screen or maximized geometry but without the matching window state flag as being targeted for auto-resizing. In the future we might detect this case and warn the user that windows should have the appropriate flags to be able to auto-resize on orientation changes. Change-Id: Ibab09de5cf37e77c356fbf51a54a2fcec4bb5c51 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Let QScreen manage UIWindow and root view-controllerTor Arne Vestbø2014-07-231-0/+1
| | | | | | | | | | Instead of having the application delegate set up a UIWindow and root view-controller, we move the responsibility to QScreen, since in a multi screen scenario we will need one UIWindow per screen, as well as one root viewcontroller per window. Change-Id: If5b0d44b8f8a697d830b33b4fe420bff56a7629b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Detect external screen connections and expose as additional QScreenTor Arne Vestbø2014-07-211-3/+1
| | | | | | | | The additional QScreen can not be used for anything yet, since we don't set up a window and root view controller for it. Change-Id: I335b796bdd89fc58a27ec4e20c5ed355be0cab66 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Change show() to imply maximize, and showFullScreen() to hide status barTor Arne Vestbø2013-11-221-1/+6
| | | | | | | | | | | | Matches the Android behavior, and gives an easy and predictable way to show true fullscreen windows that is similar to how one would do it on a desktop platform. We keep the statusbar visibility in sync with the window state of the active window. Change-Id: Ia4b99e03f83e19f9ef56cc99b9d477cc6da4c734 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Use custom method to lay out windows instead of resizeMaximizedWindows()Tor Arne Vestbø2013-11-211-0/+1
| | | | | | | | | Since we guard against overriding the geometry in setGeometry() when a window has a window state, we need to use a custom method to lay out windows that calls applyGeometry() instead. Change-Id: I6508e6aac6746c024a6172f709b8339b35b40994 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Prepare platform screen for reacting to dynamic updates to propertiesTor Arne Vestbø2013-11-201-1/+2
| | | | | Change-Id: Idb378416da2b559ed88eb5a764cacff149264f70 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Enable retina resolution for stylesMorten Johan Sørvig2013-02-271-0/+1
| | | | | | | | | | The QStyle code uses the global qApp->devicePixelRatio(), which queries the screen, not the window. Implement QIOSScreen::devicePixelRatio(). Change-Id: I0091e5793f8d07ab7a46b6de443edd9457dcff85 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Use 72 DPI for font size conversionTor Arne Vestbø2013-02-271-0/+1
| | | | | | | This matches how UIKit behaves Change-Id: I13fd2578cac84e57b6be29c42ddee414b7ee9cb9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: refactor general convenience functions into new file 'qiosglobal'Richard Moe Gustavsen2013-02-271-3/+0
| | | | | | | | Some functions are needed across several files and classes. Lets place them in a common file for all to use. Change-Id: I5f9b578f948d66d10e57a835b80b5c493e07fb4c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: refactor QIOSOrientationListener into QIOSScreenRichard Moe Gustavsen2013-02-271-1/+5
| | | | | | | | | | | | Clean up a bit. The orientation conversion functions belongs to QIOSScreen more than QIOSOrientationListener. And rename them in the same go to follow toQRect/fromQRect standard. The orientation listener itself is tightly coupled to QIOSScreen, and does not make much sense on its own, so move it into QIOSScreen to follow the same patteren already implemented for QIOSInputContext. Change-Id: I8b6b4d08a42349b4232749d59d46748297083536 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: let QIOSScreen change geometry according to interface rotationTor Arne Vestbø2013-02-271-0/+3
| | | | | | | | | | | Qt expects the screen to change geometry when the "desktop" rotates. On iOS, we interpret this as when the root view controller changes orientation, since after all, this is the surface we place QWindows on top of. Change-Id: Ia00e68c8f9f0a65aefcc60518ee544fb260d4595 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: let QIOSScreen start/stop listening for device orientationRichard Moe Gustavsen2013-02-271-0/+7
| | | | | | | | From the qpa docs, we only need to listen for device orientation if orientationUpdateMask is non-zero Change-Id: Id5e828cdff9a08794c8a029e11763cc037e1b959 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: insert Digia license headersRichard Moe Gustavsen2013-02-271-24/+24
| | | | | | | Remove Nokia. Change-Id: Iec7095ef4e3099453b6103814e826039b377ecce Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Implement QPlatformScreen::availableGeometry()Tor Arne Vestbø2013-02-271-0/+1
| | | | | | | | | | | This will sadly not work as expected until we've found a way to kick off the iOS event loop before QApplication is initialized, as UIScreen does not seem to report the correct applicationFrame (taking the status bar into account) until after the UIApplication has been set up by UIApplicationMain(). Change-Id: I0eaa3b8bca4129d1c4183a202ad2ecd0d8bc52d0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Flesh out initial QPlatformScreen implementationTor Arne Vestbø2013-02-271-8/+5
| | | | | | | | | | | | | | | | | | We check the device's model identifier to tweak the screen values based on the precense of older iPhone/iPod touch models, or the iPad Mini. This does not work when running under the simulator, which reports its model identifier as the architecture of the host platform. There doesn't appear to be any APIs to get the simulated device of the simulator, but if this becomes an issue we can always look at the UIDevice model and screen resolution and apply a few heuristics. We do not update the screen geometry on orientation-changes. This matches what UIScreen reports for bounds, but may not be the most intuitive solution from a Qt perspective compared to the way other platform-plugins work. Change-Id: I74783e053601de9ce805f8b52b944c116f9a1e3e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* iOS: Keep UIScreen* for current QIOSScreen instead of looking up each timeTor Arne Vestbø2013-02-271-3/+4
| | | | | | | Also, add enum for screen numbers, for better code readability. Change-Id: Id5162c34e80ff5efb149ae86b49f51df183d1c1d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: copy brute-force port of Qt4 uikit plugin into Qt5.Richard Moe Gustavsen2013-02-261-0/+76
The plugin has been renamed from uikit to ios. Other than that, the plugin will now build, but do nothing. Most of the Qt4 code is preserved, with a rough translation into the Qt5 qpa API. A lot of code has simply been commented out so far, and most lacking at the moment is the event dispatcher which will need to be rewritten, and the opengl paint device implementation. But it should suffice as a starting ground. Also: The plugin will currently not automatically build when building Qt, this needs to be enabled from configure first. Change-Id: I0d229a453a8477618e06554655bffc5505203b44 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>