summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtintegration.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove winrtOliver Wolff2020-06-061-313/+0
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move QPlatformBackingStoreOpenGLSupport handling out of platform pluginsTor Arne Vestbø2020-05-291-5/+1
| | | | | | | | Allows them to not depend on QtOpenGL just to provide the default backing store OpenGL support backend. Change-Id: I90d6d9247ce76848d9d03e2d512fb736c81488d3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QtPlatformCompositorSupport into QtOpenGLTor Arne Vestbø2020-05-281-1/+1
| | | | | | Task-number: QTBUG-83255 Change-Id: Id9ea654db8efb00b487d53aea03d7f23a7ab1a54 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Change qHash() to work with size_t instead of uintLars Knoll2020-04-091-1/+1
| | | | | | | | | | | This is required, so that QHash and QSet can hold more than 2^32 items on 64 bit platforms. The actual hashing functions for strings are still 32bit, this will be changed in a follow-up commit. Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Move backing store OpenGL support to the platformcompositor moduleJohan Klokkhammer Helsing2020-02-031-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformBackingStore had a dependency on the QOpenGLTextureBlitter, which is a problem because we want to get rid of all the public QOpenGL* classes in the gui module. This splits the heavily QOpenGL dependent parts of the backing store implementation into a separate class and moves it to the platformcompositor module. qplatformbackingstore.cpp is now mostly free from OpenGL implementation details. Platform integrations now have to explicitly request backing store OpenGL support. This has been done for: - xcb - windows - cocoa - winrt - android - wasm - ios QPlatformGraphicsBufferHelper::lockAndBindToTexture is now exported so it can be used from other modules. Task-number: QTBUG-74409 Change-Id: I42ad9250e5a424939cf751a8ad880c7381ede2ae Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Move screen maintenance functions from QPlatformIntegration to QWSITor Arne Vestbø2019-03-191-2/+2
| | | | | | | | | | | | | | | 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>
* winrt: Remove yet another Windows Phone leftoverOliver Wolff2019-01-021-132/+0
| | | | | | | | | | Hardware and camera button handling are phone specific APIs we no longer support in Qt. Change-Id: Ib11f894a426b8e4b71acf24876437ddab2cea548 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-071-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
| * Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-291-3/+3
| | | | | | | | | | | | | | | | | | We move QInternalMimeData to a separate file, because this class is used, even if draganddrop is disabled. From now on, include qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData. Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | WinRT: Add Windows UI Automation supportAndre de la Rocha2018-04-171-0/+17
|/ | | | | | | | | | | | | Adds support to accessibility tools and programmatic UI control to the WinRT platform through Windows UI Automation, using the AutomationPeer API. [ChangeLog][winrt][feature] Added support to Windows UI Automation to the WinRT QPA, allowing Qt-based UWP applications to operate with accessibility and programmatic UI control tools. Change-Id: If0a8edbebc7c16c4896d749f2d7e11809b4b37b3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Remove support for WinRT 8.1 and Windows Phone 8.1Maurice Kalinowski2017-01-181-14/+3
| | | | | | | | [ChangeLog][QtBase][General] Removed support for WinRT/Windows Phone 8.1. Task-number: QTBUG-57288 Change-Id: Ifd6d6780cbbdb710d99556ba3d2fb2e514d4f789 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Move WinRT font database to QtFontDatabaseSupportGabriel de Dietrich2016-11-091-1/+1
| | | | | | | | | | | | | Similar to what we recently did with the Windows font databases. The goal, again, is to add platform font database support for the minimal QPA plugin. Change-Id: Ide5f4ec452c920f169cc31c617cbcf19d8d1764d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* port to modularized platformsupport librariesOswald Buddenhagen2016-10-151-1/+1
| | | | | Change-Id: I20eb0e33abfd70b6a5240e7b6b0aa0425f2d2ee7 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* winrt: Make sure that cursor is visible when virtual keyboard is shownOliver Wolff2016-09-071-1/+1
| | | | | | | | | | | | | | | | We have to check whether the cursor is covered by the virtual keyboard when it is shown. If that is the case and the keyboard is snapped to the bottom of the screen the whole content is moved up to ensure the cursors's visibility. WinRT's input context had to be moved from the XAML to the GUI thread as the signal/slot connection does not work otherwise. Signals from QInputMethod were emitted but not handled in QWinRTInputContext as it ran on another thread which did not spin an event loop. Task-number: QTBUG-50291 Change-Id: Id89e970dc194c25ad07ceab14d9fea51bd7388b2 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-061-0/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| * winrt: fix compilation without drag and drop supportMaurice Kalinowski2016-05-311-0/+4
| | | | | | | | | | Change-Id: Ifd0d2238e8dacffe34753d95e12cccfd13519c55 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * winrt: Enable drop supportMaurice Kalinowski2016-05-311-0/+10
| | | | | | | | | | | | | | | | | | Allow Qt applications to receive drops. Dragging is not supported yet and will be handled in a separate commit. Task-number: QTBUG-50827 Change-Id: I684e3d5685ce73f74805691f6ac7bbc45e2d19ec Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Unify license header usage.Jani Heikkinen2016-03-291-12/+15
|/ | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* winrt: Fix clipboardMaurice Kalinowski2016-02-171-0/+9
| | | | | | | | | | | Native implementation was missing and so far it only used the Qt internal fallback mode. Unfortunately this does not apply to Windows Phone 8.1. Task-number: QTBUG-49766 Change-Id: I8cbbb0c843d077d7df1396d673fedeab2799b5a6 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Add support for offscreen surfacesMaurice Kalinowski2016-01-261-7/+21
| | | | | | | | | | | | | | | Previously offscreen surfaces were only needed to properly shutdown Qt Quick applications and the scene graph to have something to potentially render into but not show on the screen. However, Canvas3D requires a fully functional surface, preferably offscreen. Hence we use the QEGLPbuffer provided by eglconvenience in platformsupport. Task-number: QTBUG-50576 Change-Id: I1a32820bb2f2c6823be4e96dd92cf7965566f2c3 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: enable hardware buttons for Windows 10Maurice Kalinowski2016-01-141-35/+62
| | | | | | | | | | | | | | | | | | Previously the hardware and camera button handler were guarded inside a Q_OS_WINPHONE which does not apply to Windows 10. Instead use WINAPI_PARTITION_FAMILY like on other places, this covers Windows Phone 8.1 as well as Windows 10. To find windows.phone.ui.input.h at build time the Mobile Extension directory needs to be added to the include paths inside qmake. On runtime we need to check whether we have hardware buttons or not. In case they exist, register the handlers, otherwise skip registration. Skipping also helps to keep WACK succeeding. Task-number: QTBUG-50427 Change-Id: Ibeae15dbde12553cebd2b73b1a40b754c014f426 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winphone: Properly close the applicationMaurice Kalinowski2016-01-111-0/+17
| | | | | | | | | | | | | | | | | | | When shutting down an application on Windows Phone the SceneGraph tries to create an offscreen surface to render into. If there is no offscreen surface available, it creates a new native window and tries to hide it. As the native event loop is about to shut down, creation fails and exceptions are raised. Instead we create a vanilla QPlatformOffscreenSurface. The SceneGraph recognizes it as such and can handle a proper cleanup on its own. Furthermore removing the suspend/resume handler in the destructor of QWinRTIntegration fails for Windows Phone as the application object itself does not accept this anymore. Hence skip this part for this platform. Task-number: QTBUG-49310 Change-Id: I02acdd5a635ef0b9d6ef8199376537b8f0f1a8fb Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* WinRT: Invoke correct remove handlerMaurice Kalinowski2016-01-111-1/+1
| | | | | | | Probably a typo when moving to Xaml. Change-Id: I0739f4561912e1e16df7b124d6d187cd0f60f657 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* WinRT: Add camera button events on Windows PhoneSamuel Nevala2016-01-051-0/+64
| | | | | | | | | | | | | | Windows Phone 8.1 provides access to the camera button and press/release events get passed as Key_CameraFocus and Key_Camera. Unfortunately a release does not provide what has been pressed before, hence this information needs to be cached when the press happens. Done-with: Maurice Kalinowski<maurice.kalinowski@theqtcompany.com> Task-number: QTBUG-39115 Change-Id: I6ce58a1f07a6bf7183b8d99a26e5cd7b0d32d6db Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Use handleExtendedKeyEvent when handling back button.Samuel Nevala2015-11-191-2/+4
| | | | | | | | | | | QWindowSystemInterface::handleKeyEvent runs the shortcut override unconditionally; use QWindowSystemInterface::handleExtendedKeyEvent instead, because it allows bypassing the override (as the back button press is not a valid shortcut). This also prevents an unnecessary mutex lock. Change-Id: I8d8bb957e1556ac47e031cfe6fca6481f7c3220d Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: move input context creation into xaml threadMaurice Kalinowski2015-11-041-1/+1
| | | | | | | | | | This way we ensure that creation always works and we can access the input pane statics. Task-number: QTBUG-49034 Change-Id: I5d0340a7f6304b717f17f2106134fa9d083a7fde Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* WinRT: Add support for QOpenGLWidgetLaszlo Agocs2015-11-021-0/+1
| | | | | | | | | Also involves adding support for sharing contexts. Task-number: QTBUG-48663 Change-Id: I0b18846ae70b63a0a21132f820a12ea744c0e936 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Fix sending of back key event.Samuel Nevala2015-10-221-15/+5
| | | | | | | | | | Windows Runtime side callback is run from XAML thread and receiver is at UI thread thus sendEvent asserts. Use synchronous system interface key event handler to deliver the event. Task-Id: QTBUG-48105 Change-Id: I91a8ef6fd29c277edfb699b688b9e7895dadda8f Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* Remove superfluous newlineSamuel Nevala2015-10-221-2/+1
| | | | | Change-Id: I556ac48f586633faa6b7048e03a33a0f018973e6 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Connect callbacks after after integration class constructed.Samuel Nevala2015-10-221-16/+13
| | | | | | | | | | | It was possible for Windows Runtime callback to run while integration class was constructed. That caused an assert when handling application state change. Fix this by connecting callbacks after integration class fully constructed. Change-Id: I029c2e1f932e8edc3665443cc17dbf11eaae1bf6 Task-Id: QTBUG-48109 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* WinRT: Initialize platform servicesMaurice Kalinowski2015-10-161-0/+2
| | | | | | | | | platformServices has not been created and caused a crash as soon as an URL gets opened. Task-number: QTBUG-48740 Change-Id: Ib099a0ff3007b168738e02c0fab8f9ca7bcd25c7 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Fix capabilities query.Samuel Nevala2015-09-131-2/+2
| | | | | | | Windows Runtime port supports non-fullscreen and multiple windows. Change-Id: I6f4791a7c329ece88e5f6f9910f3635a7bfef3f8 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* winrt: Refactor platform plugin for XAML supportAndrew Knight2015-08-131-14/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using XAML as the platform compositor, many benefits are possible: - Better input context handling for tablets - Better multiple window support (including non-fullscreen windows) - Support for transparent windows and window opacity - Integration with native platform controls - Simpler orientation handling on Windows Phone with built-in transitions This patch applies only the minimal parts to make XAML mode work just as the raw D3D mode. It does this by: - Moving all OpenGL parts into QWinRTEGLContext. This will allow us to have non-OpenGL windows later (e.g. Direct2D raster surfaces). - Moving more window-specific parts into QWinRTWindow. Each window creates a SwapChainPanel which can then be used for ANGLE (or Direct2D) content. - Moving non screen-specific parts into QWinRTIntegration. - Having QWinRTScreen create the base XAML element Canvas. - Running certain calls on the UI thread where necessary. The following code parts were removed: - The UIAutomationCore code in QWinRTInputContext, as this is incompatible with XAML automation. - The D3D Trim and device blacklist, as these have been fixed in ANGLE. - Core dispatcher processing in QEventDispatcherWinRT. Now there is only one native event dispatcher; it is always running and never needs to be pumped. Future commits should address: - Maintaining the window stack list and visibility using the XAML Canvas. - Allowing for windows (e.g. popups) to be sized and positioned instead of fullscreen. - Using the XAML automation API to improve the platform input context. [ChangeLog][QPA][winrt] Windows Store apps are now composited inside a XAML container, allowing for tighter integration with the native UI layer. Change-Id: I285c6dea657c5dab2fda2b1bd8e8e5dd15882c72 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Updated WinRT license headers to use LGPLv3 instead of LGPLv21Jani Heikkinen2015-05-201-10/+13
| | | | | | | | | From 5.5.0 -> WinRT port is licensed with LGPLv3, see http://blog.qt.io/blog/2015/04/29/windows-10-support-in-qt/ Change-Id: I7e42564276af3fdbd0d4c61e2736610fa698b11c Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.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>
* winrt: Blacklist certain devices from creating a depth/stencil bufferAndrew Knight2014-11-141-1/+1
| | | | | | | | | | | This passes the EGLConfig created in the platform screen to the underlying context, and certain GPUs are blacklisted to be prevented from creating a configuration which does not render properly with Qt Quick. Task-number: QTBUG-42260 Change-Id: I7e1cdc33c2f5662538723c6930fad5f13b151d6f Reviewed-by: Oliver Wolff <oliver.wolff@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>
* winrt: Clean up platform themeAndrew Knight2014-07-101-34/+3
| | | | | | | | | | - Drop "Platform" from class name for consistency - Move styleHint() into theme class for better code reuse - Use ComPtr and result checking - Remove obsolete WinRT ifdefs Change-Id: Id26bd75739a9665f61ee2e70eb3fb36747b75410 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* winrt: Clean up QWinRTScreenAndrew Knight2014-06-251-20/+1
| | | | | | | | | | | - Remove WP8.0 code paths - Remove WinRT types from header as much as possible - Use ComPtr where appropriate - Use COM convenience methods Task-number: QTBUG-38115 Change-Id: Ib241c3e5107add255a48340f86ee5885f895ff83 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Disable non-fullscreen windows for WinRTMaurice Kalinowski2014-03-271-0/+2
| | | | | | | | | | The integration seems to have been missing this flag. Hence we tried to open new windows in non-fullscreen mode causing lots of issues. For instance this resolves QCombobox popup problems. Task-number: QTBUG-37593 Change-Id: I3d3e3699dff91dcb95613893c2a5bdefc90131b7 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* WinRT: move most of GUI event dispatcher logic into coreAndrew Knight2014-02-121-4/+1
| | | | | | | | | | The native event dispatcher is responsible for delivering callbacks to non-GUI handlers, such as network socket listeners. So, the non-GUI logic is moved into the core dispatcher so that the event loop works better for apps (and test cases) which use QCoreApplication. Change-Id: Ic5f7d939cf164198fd39aa5880e265ae560b39b4 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Implement native message box for WinRTMaurice Kalinowski2014-02-121-0/+14
| | | | | | | | | | | | | | | | Added a basic theme class, which creates accessors for the QPlatformMessageDialogHelper. This handles creation of the native dialog, but also spawning an event loop around it. There are some limitations shared with the Android implementation. First you cannot create custom labelled buttons and also selecting the default button is not possible. This will be added at a later point. Note that Windows Phone is not supported. Change-Id: I2dec83dcded7919835a6dcdf8dc2a56282024a7e Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* WinRT QPA: Improve key handlingAndrew Knight2013-10-161-0/+5
| | | | | | | | | Simplify key handling by providing a cleaner tracking of physical key presses and associated character events. Change-Id: I5aa8990e0b24e101b348c04d1ada2cbcd1b0b6be Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Adopt new event dispatcher approach for WinRT pluginOliver Wolff2013-10-121-8/+5
| | | | | | Change-Id: I5605cbe926b57b981071d71187aca6af5d2e6269 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows RT and Windows Phone QPAAndrew Knight2013-10-021-0/+192
Change-Id: I6ab8af31f73439172e43fb709831821482b1cc99 Done-with: Kamil Trzcinski Done-with: Oliver Wolff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>