Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dlls/windows.ui.core.textinput/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MODULE = windows.ui.core.textinput.dll
IMPORTS = combase
IMPORTS = combase user32

SOURCES = \
classes.idl \
Expand Down
59 changes: 49 additions & 10 deletions dlls/windows.ui.core.textinput/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@

WINE_DEFAULT_DEBUG_CHANNEL(coreinputview);

#define WM_TABTIP_OSK_TOGGLE (WM_USER + 1)

struct core_input_view
{
ICoreInputView ICoreInputView_iface;
ICoreInputView2 ICoreInputView2_iface;
ICoreInputView3 ICoreInputView3_iface;
ICoreInputView4 ICoreInputView4_iface;
struct weak_reference_source weak_reference_source;
HWND tabtip_hwnd;
};

static inline struct core_input_view *impl_from_ICoreInputView(ICoreInputView *iface)
Expand Down Expand Up @@ -159,14 +162,28 @@ static HRESULT WINAPI core_input_view_GetCoreInputViewOcclusions(ICoreInputView

static HRESULT WINAPI core_input_view_TryShowPrimaryView(ICoreInputView *iface, boolean *result)
{
FIXME("iface %p, boolean %p stub!\n", iface, result);
return E_NOTIMPL;
struct core_input_view *impl = impl_from_ICoreInputView(iface);

FIXME("iface %p, boolean %p semi-stub!\n", iface, result);

if (impl->tabtip_hwnd)
PostMessageW(impl->tabtip_hwnd, WM_TABTIP_OSK_TOGGLE, TRUE, 0);

*result = FALSE;
return S_OK;
}

static HRESULT WINAPI core_input_view_TryHidePrimaryView(ICoreInputView *iface, boolean *result)
{
FIXME("iface %p, boolean %p stub!\n", iface, result);
return E_NOTIMPL;
struct core_input_view *impl = impl_from_ICoreInputView(iface);

FIXME("iface %p, boolean %p semi-stub!\n", iface, result);

if (impl->tabtip_hwnd)
PostMessageW(impl->tabtip_hwnd, WM_TABTIP_OSK_TOGGLE, FALSE, 0);

*result = TRUE;
return S_OK;
}

static const struct ICoreInputViewVtbl core_input_view_vtbl =
Expand Down Expand Up @@ -249,22 +266,43 @@ DEFINE_IINSPECTABLE(core_input_view3, ICoreInputView3, struct core_input_view, I

static HRESULT WINAPI core_input_view3_TryShow(ICoreInputView3 *iface, boolean *result)
{
FIXME("iface %p, result %p stub!\n", iface, result);
return E_NOTIMPL;
struct core_input_view *impl = impl_from_ICoreInputView3(iface);

FIXME("iface %p, result %p semi-stub!\n", iface, result);

if (impl->tabtip_hwnd)
PostMessageW(impl->tabtip_hwnd, WM_TABTIP_OSK_TOGGLE, TRUE, 0);

*result = FALSE;
return S_OK;
}

static HRESULT WINAPI core_input_view3_TryShowWithKind(ICoreInputView3 *iface,
CoreInputViewKind type,
boolean *result)
{
FIXME("iface %p, type %d, result %p stub!\n", iface, type, result);
return E_NOTIMPL;
struct core_input_view *impl = impl_from_ICoreInputView3(iface);

FIXME("iface %p, type %d, result %p semi-stub!\n", iface, type, result);

if (impl->tabtip_hwnd && (type == CoreInputViewKind_Default || type == CoreInputViewKind_Keyboard))
PostMessageW(impl->tabtip_hwnd, WM_TABTIP_OSK_TOGGLE, TRUE, 0);

*result = FALSE;
return S_OK;
}

static HRESULT WINAPI core_input_view3_TryHide(ICoreInputView3 *iface, boolean *result)
{
FIXME("iface %p, result %p stub!\n", iface, result);
return E_NOTIMPL;
struct core_input_view *impl = impl_from_ICoreInputView3(iface);

FIXME("iface %p, result %p semi-stub!\n", iface, result);

if (impl->tabtip_hwnd)
PostMessageW(impl->tabtip_hwnd, WM_TABTIP_OSK_TOGGLE, FALSE, 0);

*result = TRUE;
return S_OK;
}

static const struct ICoreInputView3Vtbl core_input_view3_vtbl =
Expand Down Expand Up @@ -443,6 +481,7 @@ static HRESULT WINAPI core_input_view_statics_GetForCurrentView(ICoreInputViewSt
view->ICoreInputView2_iface.lpVtbl = &core_input_view2_vtbl;
view->ICoreInputView3_iface.lpVtbl = &core_input_view3_vtbl;
view->ICoreInputView4_iface.lpVtbl = &core_input_view4_vtbl;
view->tabtip_hwnd = FindWindowW(L"IPTip_Main_Window", L"Input");

if (FAILED(hr = weak_reference_source_init(&view->weak_reference_source,
(IUnknown *)&view->ICoreInputView_iface)))
Expand Down
1 change: 1 addition & 0 deletions dlls/windows.ui.core.textinput/private.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winstring.h"
#include "activation.h"
#include "wine/debug.h"
Expand Down