summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosintegration.h
Commit message (Collapse)AuthorAgeFilesLines
* Add preliminary support for Qt for visionOSTor Arne Vestbø6 days1-4/+7
| | | | | | | | | | | | | | | | | | | | | | Qt already runs on Vision Pro as "Designed for iPad", using Qt for iOS. This change enables building Qt for visionOS directly, which opens the door to visionOS specific APIs and use-cases such as volumes and immersive spaces. The platform removes some APIs we depend on, notably UIScreen, so some code paths have been disabled or mocked to get something up and running. As our current window management approach on UIKit platforms depends on UIWindow and UIScreen there is currently no way to bring up QWindows. This will improve once we refactor our window management to use window scenes. To configure for visionOS, pass -platform macx-visionos-clang, and optionally add -sdk xrsimulator to build for the simulator. Change-Id: I4eda55fc3fd06e12d30a188928487cf68940ee07 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* iOS: Add support for foreign windowsTor Arne Vestbø2023-08-181-0/+1
| | | | | | | Task-number: QTBUG-116183 Pick-to: 6.6 Change-Id: Ia92ee2d15f2e91a326ad342237fb0a83305c019f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* iOS: Fix build with -no-openglTor Arne Vestbø2023-02-011-0/+3
| | | | | | Pick-to: 6.5 Change-Id: I014fa1772f629ef4224ac98bfc30eb5a86f38fde Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add QGuiApplication API to set a number-badge in the Dock/task barTor Arne Vestbø2022-12-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API is supported on macOS, iOS, and Windows. On Android no official API exists for badging the application icon, and we don't want to take on dependencies like ShortcutBadger [1]. The macOS and iOS implementations are trivial. The same goes for the WinRT based implementation on Windows, but this API is only available for applications that have a so called "package identity", and does not seem to be stable for Windows 10. To cover the cases where this API is not available we fall back to drawing the badge manually, and set it as an overlay icon on the task bar using ITaskbarList3. The look of this badge has been tweaked to match the Windows 11/10 styles, and will pick up the user's choice of dark/light mode and accent color if available. [1] https://github.com/leolin310148/ShortcutBadger/ [ChangeLog][QtGui] Added QGuiApplication::setBadgeNumber() to inform the user about e.g. the number of unread e-mail or queued tasks. The badge will be overlaid on the application's icon in the Dock on macOS, the home screen icon on iOS, or the task bar on Windows. Task-number: QTBUG-94009 Change-Id: I6447d55177f9987b0dfcd93caf63c6167f7224c7 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace QT_NO_ACCESSIBILITY with QT_CONFIG(accessibility)Allan Sandfeld Jensen2022-06-151-1/+1
| | | | | | | Pick-to: 6.4 Change-Id: Iee4bd8970810be1b23bdba65a74de912401dca65 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Introduce QInputDevice hierarchy; replace QTouchDeviceShawn Rutledge2020-06-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have seen during the Qt 5 series that QMouseEvent::source() does not provide enough information: if it is synthesized, it could have come from any device for which mouse events are synthesized, not only from a touchscreen. By providing in every QInputEvent as complete information about the actual source device as possible, we will enable very fine-tuned behavior in the object that handles each event. Further, we would like to support multiple keyboards, pointing devices, and named groups of devices that are known as "seats" in Wayland. In Qt 5, QPA plugins registered each touchscreen as it was discovered. Now we extend this pattern to all input devices. This new requirement can be implemented gradually; for now, if a QTWSI input event is received wtihout a device pointer, a default "core" device will be created on-the-fly, and a warning emitted. In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when multiple devices were in use simultaneously. Now that each event identifies the device it came from, this hack is no longer needed. A stub of the new QPointerEvent is added; it will be developed further in subsequent patches. [ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer to an instance of QInputDevice, or the subclass QPointingDevice in case of mouse, touch and tablet events. Each platform plugin is expected to create the device instances, register them, and provide valid pointers with all input events. If this is not done, warnings are emitted and default devices are created as necessary. When the device has accurate information, it provides the opportunity to fine-tune behavior depending on device type and capabilities: for example if a QMouseEvent is synthesized from a touchscreen, the recipient can see which touchscreen it came from. Each device also has a seatName to distinguish users on multi-user windowing systems. Touchpoint IDs are no longer unique on their own, but the combination of ID and device is. Fixes: QTBUG-46412 Fixes: QTBUG-72167 Task-number: QTBUG-69433 Task-number: QTBUG-52430 Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Move screen maintenance functions from QPlatformIntegration to QWSITor Arne Vestbø2019-03-191-4/+0
| | | | | | | | | | | | | | | QWindowSystemInterface is the de facto API for any plumbing going from the platform plugin to QtGui. Having the functions as protected members of QPlatformIntegration was idiosyncratic, and resulted in awkward workarounds to be able to call the functions from outside of the QPlatformIntegration subclass. The functions in QPlatformIntegration have been left in, but deprecated so that platform plugins outside of qtbase have a chance to move over to the new QWSI API before they are removed. Change-Id: I327fec460db6b0faaf0ae2a151c20aa30dbe7182 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* iOS: Trigger manual layout of root view controller when coming out of backgroundTor Arne Vestbø2018-04-181-0/+2
| | | | | | | | | | | | | | When rotating the device when the application is in the background iOS will ask the root view controller to layout its views when then foregrounding the application, but at that point the application state is still in the suspended state, meaning we block any view resizing or rendering. To ensure the views are resized correctly, we trigger a manual layout after the application comes out of the suspended state. Task-number: QTBUG-67719 Change-Id: I1ef0a4133d4b94edaac7b0f3cb4e49e367eb76d4 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-301-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * iOS: Harden application state change logicTor Arne Vestbø2017-12-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure we catch application state changes as early as possible, and deal properly with any changes delivered before we have an app to send them to. Change-Id: I6d0ea0398f9fab88fc182342769b075cb144227f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-301-7/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| * | iOS: Use environment variables for debug flags instead of QObject propertiesTor Arne Vestbø2017-11-281-7/+0
| |/ | | | | | | | | | | | | | | The former is more idiomatic in Qt, and doesn't require as much boilerplate to set up. Change-Id: Idf03af4018611c8eb3b31af90da72f9d85617b2c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* / Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-17/+17
|/ | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-011-2/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/win/msvc_version.cpp configure.pri mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf src/corelib/io/qsettings_mac.cpp src/corelib/json/qjsondocument.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.h src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro src/plugins/platforms/ios/qiosintegration.h src/plugins/platforms/minimalegl/qminimaleglintegration.cpp tests/auto/gui/painting/qpainter/tst_qpainter.cpp tools/configure/environment.cpp Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-271-2/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.h src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileenginefactory.h src/plugins/platforms/ios/qiosintegration.h src/widgets/widgets/qcombobox.cpp tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp Change-Id: Ibaee7cbbba99e7c4b1d8926e55932ffa6030ce45
| | * iOS: refactor usage of photos into optional pluginRichard Moe Gustavsen2016-10-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting from iOS 10, apps that tries to access photos on the device need to specify the reason for this up front by adding the key 'NSPhotoLibraryUsageDescription' into Info.plist. If the key is missing, the app will be rejected from AppStore. This causes problems for the iOS plugin as it stands since parts of it already tries to access photos, e.g to show an image picker dialog if a file dialog is set to open QStandardPaths::PicturesLocation. This means that currently, all apps written with Qt will be rejected from AppStore unless the developer adds this key, whether he tries to access photos or not. To solve this, we choose to split the plugin into two parts, one that contains the core functionality, and one that contains optional support. The latter will need to be enabled explicit by the developer in the pro file, or in this case, indirectly by adding the right key to the Info.plist. This patch refactors the code in the plugin that gives access to photos into a separate optional plugin called 'nsphotolibrarysupport'. Change-Id: Ic4351eb0bbfffdf840fd88cd00bb29a25907798f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | fix build with various QT_NO_* definesNick Shaforostoff2016-08-261-0/+4
| | | | | | | | | | | | | | | | | | | | | Done-with: Andriy Gerasika <andriy.gerasika@gmail.com> Change-Id: I90883a491dbddb005c3d756c339e42285d50e437 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Fix tvOS buildMike Krus2016-05-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | QIOSTextInputOverlay was excluded from build not member variable was not, leading to link errors Change-Id: Ia9c09c503decb596907a17dc8fe8fd0f8d5f657f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Add support for Apple tvOSMike Krus2016-05-171-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass -xplatform macx-tvos-clang to configure to build. Builds device and simulator by default. Added ‘uikit’ platform with the common setup. Also added QT_PLATFORM_UIKIT define (undocumented). qmake config defines tvos (but not ios). tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be embedded in the binary. A new ‘bitcode’ configuration was added. For ReleaseDevice builds (which get archived and push to the store), bitcode is actually embedded (-fembed-bitcode passed to clang). For all other configurations, only using bitcode markers to keep file size down (-fembed-bitcode-marker). Build disables Widgets in qtbase, and qtscript (unsupported, would require fixes to JavaScriptCore source code). Qpa same as on iOS but disables device orientation, status bar, clipboard, menus, dialogs which are not supported on tvOS. Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | iOS: Add text selection support from the platform pluginRichard Moe Gustavsen2016-05-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will add touch based text selection support to Qt from the iOS plugin. QIOSTextInputOverlay will listen to changes to the focus object, and if IM enabled, create three different gesture recognizers that tracks what the user is doing. The first recogniser detects if the user does a press and hold on the text when there is no selection. If triggered, it will show a loupe that follows the touch around together with the cursor. The second recogniser will instead be active when text is selected, and takes care of drawing a set of handles on each side of the selection. If the user drags on any of the handles, a loupe will show that follows the touch/text line together with the handle. The third recogniser detects if the user does a tap, and depending on if there's a selection, or if the cursor didn't move, it will show or hide the edit menu. The handles and loupe are implemented as overlays using Core Animation layers. Change-Id: Idff6e40e12307a458c9c399b0487bb976fce29c8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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: Implement support for QApplication::beep()Tor Arne Vestbø2015-12-171-0/+2
|/ | | | | | | | | | | | | Vibrates the device or plays an alert sound on devices that do not support vibration. The other implementations of beep() have been moved to QPlatformIntegration as a proper API instead of having them as invokables in QPlatformNativeInterface. Change-Id: Ic597dbef04b46d49862b070e78ddfc0d763829a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
* iOS: add missing Q_DECL_OVERRIDERichard Moe Gustavsen2015-07-271-13/+13
| | | | | | | Add missing Q_DECL_OVERRIDE to silence clang. Change-Id: I57261a39f0dcf4e0ffd8d9c079a95f2d3347d34a Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* iOS: Add platform plugin option to debug window managementTor Arne Vestbø2015-03-161-0/+6
| | | | | | | | | | | | When the 'debugWindowManagement' option is enabled, e.g. by passing the argument -platform ios:debugWindowManagement to the application, the plugin will add a background color and outline to all QUIViews, as well as draw a grid for the underlying QUIViewController. This makes it easier to see where windows are placed when the window itself doesn't draw anything, e.g. in unit tests. Change-Id: If9a59822e0b320b154ad8e338f9fb5ec7cf191a2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* iOS: Prepare QIOSIntegration for handling plugin optionsTor Arne Vestbø2015-03-121-3/+7
| | | | | | | | | | QGuiApplication sets options passed to the plugin through -platform as properties on the QPlatformNativeInterface. To handle those we need to inherit QPlatformNativeInterface first (which is the QObject subclass), and include the Q_OBJECT macro. Change-Id: Ia496851c64cbb0036c26e7ed0683d0ecfa8319cc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* iOS: add a file engine to support loading assets/photosRichard Moe Gustavsen2015-02-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch will add a new file engine that lets the app load images from the asset library using QFile. The engine will recognize file names with the scheme 'assets-library', which is the same scheme returned by UIImagePickerController. This patch will be the first of a set of patches that lets the user open a native image picker dialog by using a QFileDialog with directory set to QStandardPaths::PictureLocation. This patch will ensure that the url returned from the dialog can be loaded using QFile. AssetsLibrary, which is used in this patch, is actually deprecated in favor of the new Photos framework. But since the latter is only supported from iOS8, we choose to use the former framework for now. Change-Id: If2a6eb394ae4df55fb4e9e1dc245a1574d38618a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.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: Use QPlatformIntegration::destroyScreen() instead of manual deleteTor Arne Vestbø2015-01-211-0/+2
| | | | | Change-Id: I8128fa1a4b7d6d202d15c03d51f6360a74d75d8c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.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: Detect external screen connections and expose as additional QScreenTor Arne Vestbø2014-07-211-1/+2
| | | | | | | | 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: Add helper for getting the iOS platform integration instanceTor Arne Vestbø2014-07-211-0/+2
| | | | | Change-Id: I550d345ab0f8bcba1225c425464e198d43d9fda8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Accessibility iOSFrederik Gladhorn2014-06-061-0/+3
| | | | | | | | | | | | | | | | | | | | | This lays the foundation for iOS accessibility. The approach is slightly different from other a11y bridges in that we completely flaten the hierarchy of wigets/quick items to a list. This works well with VoiceOver since there are comparatively few elements. The cache implementation for OS X is re-used. With this patch VoiceOver on iOS works on many applications out of the box. For now it sends the screen changed notfification somewhat overzealous, that will need revisiting and potentially new API in QAccessible. Device orientation changes are not yet supported. [ChangeLog][iOS] Accessibility was added to the iOS platform port. This enables Qt applications to be read by VoiceOver on iOS devices. Task-number: QTBUG-39097 Change-Id: I441e844652d528cc2fdcc444f43b54ed6fa04f0c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Add support for offscreen GL surfaces without using hidden windowsTor Arne Vestbø2014-03-281-0/+1
| | | | | | | | | | | | | | There's no need to create a hidden window to get a surface on iOS, as the platform supports FBOs. Note that defaultFramebufferObject() returns 0 in the case of offscreen surfaces, which is technically not a valid FBO on iOS due to the indirect rendering, but binding and rendering to the zero-FBO seems to be no-ops, so clients may safely call eg glBindFramebuffer(GL_FRAMEBUFFER, ctx->defaultFramebufferObject()) to restore the default FBO after drawing to its own FBO. Change-Id: I2e67f5d69c0698562052f5ac1df0bbfaa3337148 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* iOS: implement clipboardRichard Moe Gustavsen2014-03-061-0/+2
| | | | | | | | This will implement support for copy/paste operations inside, and between, applications. Change-Id: I50031b89bdb07f106950dc90fb8b1accbd1191bb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Re-enable drag-and-drop on iOS after bugfixes to QBasicDrag and friendsTor Arne Vestbø2014-03-061-2/+0
| | | | | Change-Id: I0fd4e5e8d561826841cc78b26cd524ba01a8b689 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* iOS: Disable drag and drop completely instead of enabling simple d'n'dTor Arne Vestbø2013-12-041-0/+2
| | | | | | | | | The drag and drop event filters do not play nicely with touch events or virtual keyboards. Task-number: QTBUG-35348 Change-Id: Id4d079ae72882f48750d394f13e10700d60e4532 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Implement QPlatformServices to handle opening URLsTor Arne Vestbø2013-10-031-0/+4
| | | | | Change-Id: Ie644df16b919d6def1435dc5f3665ba3f62fb055 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Delete members in platform integrationTor Arne Vestbø2013-10-031-0/+1
| | | | | Change-Id: Ibb1bf2bf4a1ced897172facbc9027402adfe6f08 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* QPA: Fix semantics of GUI event dispatcher ownership in platform pluginsTor Arne Vestbø2013-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPlatformIntegration::guiThreadEventDispatcher() function acted as an accessor to event dispatchers created in the constructor of each platform plugin, but the logic and semantics of event-dispatcher handling in Qt itself (QCoreApplication/QGuiApplication) still assumed both ownership and control over the event dispatcher, such as when to create one, which one to create, and when to delete it. This conflicted with the explicit calls in the platform plugins to QGuiApplication::setEventDispatcher(), as well as left a possibility that the event-dispatcher created by the platform plugin would never be deleted, as none of the platform plugins actually took full ownership of the dispatcher and deleted it in its destructor. The integration function has now been renamed back to its old name, createEventDispatcher(), and acts as a factory function, leaving the logic and lifetime of event dispatcher to QtCoreApplication. The only platform left with creating the event-dispatcher in the constructor is QNX, where other parts of the platform relies on having an event-dispatcher before their initialization. We then need to manually take care of the ownership transfer, so that the event-dispatcher is still destroyed at some point. Change-Id: I113db97d2545ebda39ebdefa865e488d2ce9368b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* iOS: add support for Qt::ApplicationStatesRichard Moe Gustavsen2013-06-251-0/+3
| | | | | Change-Id: I39858fe835c131d5c681db535f2ec9308e2f8223 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: don't delete m_touchDevice, QPA takes ownershipRichard Moe Gustavsen2013-04-221-1/+0
| | | | | | | | | | | | When registering m_touchDevice with QWindowSystemInterface, it will also transfer ownership to it. It will eventually be deleted in clenupDevicesList on qtouchdevice.cpp. This patch will also stop the app from crashing when telling it to quit. Change-Id: I97070efdf16b4db7d076935fbec62e60f094a7df Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Add QIOSIntegration::hasCapability functionRichard Moe Gustavsen2013-02-271-0/+2
| | | | | | | | Add the missing override, and report that we support OpenGL (and multiple windows). Change-Id: If95138cab9099b547d12d3dfed008bd63b6d2acf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Implement touch events.Morten Johan Sørvig2013-02-271-0/+3
| | | | | | | | | | | | | | | Track touch events during the standard [Began -> Moved -> Ended] event sequence based on the UITouch pointer which stays constant. Enable multiTouch on Qt's UIView. Mouse events should now be automatically created from (unhanded) touch events by QGuiApplication. Reviewed by: Ada Sørvig (fingerpaint app approved) Change-Id: I2aeb48c962c697d8b8337f8ceab062070c2a4240 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Make fusion style the default style on iOS, not the windows styleTor Arne Vestbø2013-02-271-0/+3
| | | | | Change-Id: I81b6049ff666bf23ac58d60e10d7c3d8713a19ea Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: add class QIOSInputContext (to handle keyboard)Richard Moe Gustavsen2013-02-271-0/+2
| | | | | | | | This change will add an initial implementation of the QPlatformInputContext for dealing with the keyboard. Change-Id: I29c1cfbbebb8456977b8a1db0e966973cd2c24a5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Enable the ShowIsFullScreen style-hint so that show() implies fullscreenTor Arne Vestbø2013-02-271-0/+2
| | | | | | | | | | We may need to qualify this setting for UC2, so that the user may still create windows as sub-controls of a regular iOS user interface, but for UC1 it makes sense. Change-Id: I1a7019f901fabed8b5b9cbb18a929913780e6595 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@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: Use default createPlatformPixmap implementationMorten Johan Sorvig2013-02-271-1/+0
| | | | | | | | No need to implement this one, the standard implementation creates a raster pixmap. Change-Id: I9bb25188bd95159d76e760b2be6870e0bede7b56 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>