summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtinputcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtinputcontext.cpp')
-rw-r--r--src/plugins/platforms/winrt/qwinrtinputcontext.cpp131
1 files changed, 1 insertions, 130 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtinputcontext.cpp b/src/plugins/platforms/winrt/qwinrtinputcontext.cpp
index c94b53ef1c..7bd9e87ca6 100644
--- a/src/plugins/platforms/winrt/qwinrtinputcontext.cpp
+++ b/src/plugins/platforms/winrt/qwinrtinputcontext.cpp
@@ -182,135 +182,6 @@ void QWinRTInputContext::hideInputPanel()
qErrnoWarning(hr, "Failed to hide input panel.");
}
-#else // Q_OS_WINPHONE
-
-// IRawElementProviderSimple
-HRESULT QWinRTInputContext::get_ProviderOptions(ProviderOptions *retVal)
-{
- *retVal = ProviderOptions_ServerSideProvider|ProviderOptions_UseComThreading;
- return S_OK;
-}
-
-HRESULT QWinRTInputContext::GetPatternProvider(PATTERNID id, IUnknown **retVal)
-{
- switch (id) {
- case 10002: //UIA_ValuePatternId
- return QueryInterface(__uuidof(IValueProvider), (void**)retVal);
- break;
- case 10014: //UIA_TextPatternId:
- return QueryInterface(__uuidof(ITextProvider), (void**)retVal);
- case 10029: //UIA_TextChildPatternId:
- *retVal = nullptr;
- break;
- default:
- qWarning("Unhandled pattern ID: %d", id);
- break;
- }
- return S_OK;
-}
-
-HRESULT QWinRTInputContext::GetPropertyValue(PROPERTYID idProp, VARIANT *retVal)
-{
- switch (idProp) {
- case 30003: //UIA_ControlTypePropertyId
- retVal->vt = VT_I4;
- retVal->lVal = 50025; //UIA_CustomControlTypeId
- break;
- case 30008: //UIA_IsKeyboardFocusablePropertyId
- case 30009: //UIA_HasKeyboardFocusPropertyId
- // These are probably never actually called
- case 30016: //UIA_IsControlElementPropertyId
- case 30017: //UIA_IsContentElementPropertyId
- retVal->vt = VT_BOOL;
- retVal->boolVal = VARIANT_TRUE;
- break;
- case 30019: //UIA_IsPasswordPropertyId
- retVal->vt = VT_BOOL;
- retVal->boolVal = VARIANT_FALSE;
- break;
- case 30020: //UIA_NativeWindowHandlePropertyId
- retVal->vt = VT_PTR;
- retVal->punkVal = m_screen->coreWindow();
- break;
- }
- return S_OK;
-}
-
-HRESULT QWinRTInputContext::get_HostRawElementProvider(IRawElementProviderSimple **retVal)
-{
- // Return the window's element provider
- IInspectable *hostProvider;
- HRESULT hr = m_screen->coreWindow()->get_AutomationHostProvider(&hostProvider);
- if (SUCCEEDED(hr)) {
- hr = hostProvider->QueryInterface(IID_PPV_ARGS(retVal));
- hostProvider->Release();
- }
- return hr;
-}
-
-// ITextProvider
-HRESULT QWinRTInputContext::GetSelection(SAFEARRAY **)
-{
- // To be useful, requires listening to the focus object for a selection change and raising an event
- return S_OK;
-}
-
-HRESULT QWinRTInputContext::GetVisibleRanges(SAFEARRAY **)
-{
- // To be useful, requires listening to the focus object for a selection change and raising an event
- return S_OK;
-}
-
-HRESULT QWinRTInputContext::RangeFromChild(IRawElementProviderSimple *,ITextRangeProvider **)
-{
- // To be useful, requires listening to the focus object for a selection change and raising an event
- return S_OK;
-}
-
-HRESULT QWinRTInputContext::RangeFromPoint(UiaPoint, ITextRangeProvider **)
-{
- // To be useful, requires listening to the focus object for a selection change and raising an event
- return S_OK;
-}
-
-HRESULT QWinRTInputContext::get_DocumentRange(ITextRangeProvider **)
-{
- // To be useful, requires listening to the focus object for a selection change and raising an event
- return S_OK;
-}
-
-HRESULT QWinRTInputContext::get_SupportedTextSelection(SupportedTextSelection *)
-{
- // To be useful, requires listening to the focus object for a selection change and raising an event
- return S_OK;
-}
-
-// IValueProvider
-HRESULT QWinRTInputContext::SetValue(LPCWSTR)
-{
- // To be useful, requires listening to the focus object for a value change and raising an event
- // May be useful for inputPanel autocomplete, etc.
- return S_OK;
-}
-
-HRESULT QWinRTInputContext::get_Value(BSTR *)
-{
- // To be useful, requires listening to the focus object for a value change and raising an event
- // May be useful for inputPanel autocomplete, etc.
- return S_OK;
-}
-
-HRESULT QWinRTInputContext::get_IsReadOnly(BOOL *isReadOnly)
-{
- // isReadOnly dictates keyboard opening behavior when view is tapped.
- // We need to decide if the user tapped within a control which is about to receive focus...
- // Since this isn't possible (this function gets called before we receive the touch event),
- // the most platform-aligned option is to show the keyboard if an editable item has focus,
- // and close the keyboard if it is already open.
- *isReadOnly = m_isInputPanelVisible || !inputMethodAccepted();
- return S_OK;
-}
-
-#endif // !Q_OS_WINPHONE
+#endif // Q_OS_WINPHONE
QT_END_NAMESPACE