diff options
author | Andrew Knight <andrew.knight@intopalo.com> | 2015-08-12 12:43:54 +0300 |
---|---|---|
committer | Andrew Knight <andrew.knight@intopalo.com> | 2015-08-13 16:12:37 +0000 |
commit | 807ec8ea48281d5dbe365895fd9679da5b6753a5 (patch) | |
tree | b65ffb79da8e2941385b345dda7cc49f5638a0b0 /src/plugins/platforms/winrt/qwinrtinputcontext.h | |
parent | ebc2b963aa9e8ce2e983ef08c9b503ccc1702fdb (diff) |
winrt: Refactor platform plugin for XAML support
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>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtinputcontext.h')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtinputcontext.h | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtinputcontext.h b/src/plugins/platforms/winrt/qwinrtinputcontext.h index ce7fbabf49..cc3bce435f 100644 --- a/src/plugins/platforms/winrt/qwinrtinputcontext.h +++ b/src/plugins/platforms/winrt/qwinrtinputcontext.h @@ -41,9 +41,6 @@ #include <QtCore/QRectF> #include <wrl.h> -#ifndef Q_OS_WINPHONE -# include <UIAutomationCore.h> -#endif namespace ABI { namespace Windows { @@ -63,11 +60,6 @@ QT_BEGIN_NAMESPACE class QWinRTScreen; class QWinRTInputContext : public QPlatformInputContext -#ifndef Q_OS_WINPHONE - , public Microsoft::WRL::RuntimeClass< - Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::WinRtClassicComMix>, - IRawElementProviderSimple, ITextProvider, IValueProvider> -#endif // !Q_OS_WINPHONE { public: explicit QWinRTInputContext(QWinRTScreen *); @@ -79,26 +71,7 @@ public: #ifdef Q_OS_WINPHONE void showInputPanel(); void hideInputPanel(); -#else // Q_OS_WINPHONE - // IRawElementProviderSimple - HRESULT __stdcall get_ProviderOptions(ProviderOptions *retVal); - HRESULT __stdcall GetPatternProvider(PATTERNID, IUnknown **); - HRESULT __stdcall GetPropertyValue(PROPERTYID idProp, VARIANT *retVal); - HRESULT __stdcall get_HostRawElementProvider(IRawElementProviderSimple **retVal); - - // ITextProvider - HRESULT __stdcall GetSelection(SAFEARRAY **); - HRESULT __stdcall GetVisibleRanges(SAFEARRAY **); - HRESULT __stdcall RangeFromChild(IRawElementProviderSimple *,ITextRangeProvider **); - HRESULT __stdcall RangeFromPoint(UiaPoint, ITextRangeProvider **); - HRESULT __stdcall get_DocumentRange(ITextRangeProvider **); - HRESULT __stdcall get_SupportedTextSelection(SupportedTextSelection *); - - // IValueProvider - HRESULT __stdcall SetValue(LPCWSTR); - HRESULT __stdcall get_Value(BSTR *); - HRESULT __stdcall get_IsReadOnly(BOOL *); -#endif // !Q_OS_WINPHONE +#endif private: HRESULT onShowing(ABI::Windows::UI::ViewManagement::IInputPane *, |