Huw Davies : riched20: Implement ITextServices_OnTxInPlaceActivate().
Alexandre Julliard
julliard at winehq.org
Mon Mar 22 17:15:51 CDT 2021
Module: wine
Branch: master
Commit: 14f4bd96970f8dac9c0053f0d48c668221d67047
URL: https://source.winehq.org/git/wine.git/?a=commit;h=14f4bd96970f8dac9c0053f0d48c668221d67047
Author: Huw Davies <huw at codeweavers.com>
Date: Mon Mar 22 08:55:49 2021 +0000
riched20: Implement ITextServices_OnTxInPlaceActivate().
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/riched20/editor.c | 1 +
dlls/riched20/editstr.h | 3 ++-
dlls/riched20/txtsrv.c | 22 +++++++++++++++++-----
3 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 7027b148188..293ac0bad5a 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -2936,6 +2936,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
ed->texthost = texthost;
ed->reOle = NULL;
ed->bEmulateVersion10 = bEmulateVersion10;
+ ed->in_place_active = FALSE;
ed->total_rows = 0;
ITextHost_TxGetPropertyBits( texthost, TXTBIT_RICHTEXT | TXTBIT_MULTILINE | TXTBIT_READONLY |
TXTBIT_USEPASSWORD | TXTBIT_HIDESELECTION | TXTBIT_SAVESELECTION |
diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h
index 2d2816340bc..c0fef69547e 100644
--- a/dlls/riched20/editstr.h
+++ b/dlls/riched20/editstr.h
@@ -380,7 +380,8 @@ typedef struct tagME_TextEditor
HWND hWnd, hwndParent;
ITextHost *texthost;
IUnknown *reOle;
- BOOL bEmulateVersion10;
+ unsigned int bEmulateVersion10 : 1;
+ unsigned int in_place_active : 1;
ME_TextBuffer *pBuffer;
ME_Cursor *pCursors;
DWORD props;
diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c
index d637d52ea3b..d95a3ac4c7e 100644
--- a/dlls/riched20/txtsrv.c
+++ b/dlls/riched20/txtsrv.c
@@ -233,12 +233,23 @@ static HRESULT update_client_rect( struct text_services *services, const RECT *c
}
DEFINE_THISCALL_WRAPPER(fnTextSrv_OnTxInPlaceActivate,8)
-DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxInPlaceActivate(ITextServices *iface, LPCRECT prcClient)
+DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxInPlaceActivate( ITextServices *iface, const RECT *client )
{
struct text_services *services = impl_from_ITextServices( iface );
+ HRESULT hr;
+ BOOL old_active = services->editor->in_place_active;
- FIXME( "%p: STUB\n", services );
- return E_NOTIMPL;
+ TRACE( "%p: %s\n", services, wine_dbgstr_rect( client ) );
+
+ services->editor->in_place_active = TRUE;
+ hr = update_client_rect( services, client );
+ if (FAILED( hr ))
+ {
+ services->editor->in_place_active = old_active;
+ return hr;
+ }
+ ME_RewrapRepaint( services->editor );
+ return S_OK;
}
DEFINE_THISCALL_WRAPPER(fnTextSrv_OnTxInPlaceDeactivate,4)
@@ -246,8 +257,9 @@ DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxInPlaceDeactivate(ITextServices
{
struct text_services *services = impl_from_ITextServices( iface );
- FIXME( "%p: STUB\n", services );
- return E_NOTIMPL;
+ TRACE( "%p\n", services );
+ services->editor->in_place_active = FALSE;
+ return S_OK;
}
DEFINE_THISCALL_WRAPPER(fnTextSrv_OnTxUIActivate,4)
More information about the wine-cvs
mailing list