riched20: Remove the windows from the editor structure.
This in turn allows removal of the editor from the host. Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f83a52788f
commit
cc3a86d86b
@ -2933,8 +2933,6 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
|
||||
LONG selbarwidth;
|
||||
HRESULT hr;
|
||||
|
||||
ed->hWnd = NULL;
|
||||
ed->hwndParent = NULL;
|
||||
ed->sizeWindow.cx = ed->sizeWindow.cy = 0;
|
||||
if (ITextHost_QueryInterface( texthost, &IID_ITextHost2, (void **)&ed->texthost ) == S_OK)
|
||||
{
|
||||
|
@ -395,7 +395,7 @@ BOOL ME_Redo(ME_TextEditor *editor) DECLSPEC_HIDDEN;
|
||||
void ME_EmptyUndoStack(ME_TextEditor *editor) DECLSPEC_HIDDEN;
|
||||
|
||||
/* txtsrv.c */
|
||||
HRESULT create_text_services( IUnknown *outer, ITextHost *text_host, IUnknown **unk, BOOL emulate_10, ME_TextEditor **editor ) DECLSPEC_HIDDEN;
|
||||
HRESULT create_text_services( IUnknown *outer, ITextHost *text_host, IUnknown **unk, BOOL emulate_10 ) DECLSPEC_HIDDEN;
|
||||
#ifdef __ASM_USE_THISCALL_WRAPPER
|
||||
extern const struct ITextServicesVtbl text_services_stdcall_vtbl DECLSPEC_HIDDEN;
|
||||
#define TXTSERV_VTABLE(This) (&text_services_stdcall_vtbl)
|
||||
|
@ -377,7 +377,6 @@ typedef struct tagME_InStream ME_InStream;
|
||||
|
||||
typedef struct tagME_TextEditor
|
||||
{
|
||||
HWND hWnd, hwndParent;
|
||||
ITextHost2 *texthost;
|
||||
IUnknown *reOle;
|
||||
unsigned int bEmulateVersion10 : 1;
|
||||
|
@ -36,7 +36,6 @@ struct host
|
||||
ITextHost2 ITextHost_iface;
|
||||
LONG ref;
|
||||
ITextServices *text_srv;
|
||||
ME_TextEditor *editor; /* to be removed */
|
||||
HWND window, parent;
|
||||
unsigned int emulate_10 : 1;
|
||||
unsigned int dialog_mode : 1;
|
||||
@ -112,7 +111,6 @@ struct host *host_create( HWND hwnd, CREATESTRUCTW *cs, BOOL emulate_10 )
|
||||
texthost->para_fmt.wAlignment = PFA_RIGHT;
|
||||
if (cs->style & ES_CENTER)
|
||||
texthost->para_fmt.wAlignment = PFA_CENTER;
|
||||
texthost->editor = NULL;
|
||||
host_init_props( texthost );
|
||||
texthost->event_mask = 0;
|
||||
texthost->use_set_rect = 0;
|
||||
@ -871,7 +869,7 @@ static BOOL create_windowed_editor( HWND hwnd, CREATESTRUCTW *create, BOOL emula
|
||||
|
||||
if (!host) return FALSE;
|
||||
|
||||
hr = create_text_services( NULL, (ITextHost *)&host->ITextHost_iface, &unk, emulate_10, &host->editor );
|
||||
hr = create_text_services( NULL, (ITextHost *)&host->ITextHost_iface, &unk, emulate_10 );
|
||||
if (FAILED( hr ))
|
||||
{
|
||||
ITextHost2_Release( &host->ITextHost_iface );
|
||||
@ -880,9 +878,6 @@ static BOOL create_windowed_editor( HWND hwnd, CREATESTRUCTW *create, BOOL emula
|
||||
IUnknown_QueryInterface( unk, &IID_ITextServices, (void **)&host->text_srv );
|
||||
IUnknown_Release( unk );
|
||||
|
||||
host->editor->hWnd = hwnd; /* FIXME: Remove editor's dependence on hWnd */
|
||||
host->editor->hwndParent = create->hwndParent;
|
||||
|
||||
SetWindowLongPtrW( hwnd, 0, (LONG_PTR)host );
|
||||
|
||||
return TRUE;
|
||||
|
@ -581,8 +581,7 @@ static const ITextServicesVtbl textservices_vtbl =
|
||||
THISCALL(fnTextSrv_TxGetCachedSize)
|
||||
};
|
||||
|
||||
HRESULT create_text_services( IUnknown *outer, ITextHost *text_host, IUnknown **unk, BOOL emulate_10,
|
||||
ME_TextEditor **editor )
|
||||
HRESULT create_text_services( IUnknown *outer, ITextHost *text_host, IUnknown **unk, BOOL emulate_10 )
|
||||
{
|
||||
struct text_services *services;
|
||||
|
||||
@ -595,7 +594,6 @@ HRESULT create_text_services( IUnknown *outer, ITextHost *text_host, IUnknown **
|
||||
services->IUnknown_inner.lpVtbl = &textservices_inner_vtbl;
|
||||
services->ITextServices_iface.lpVtbl = &textservices_vtbl;
|
||||
services->editor = ME_MakeEditor( text_host, emulate_10 );
|
||||
if (editor) *editor = services->editor; /* To be removed */
|
||||
|
||||
if (outer) services->outer_unk = outer;
|
||||
else services->outer_unk = &services->IUnknown_inner;
|
||||
@ -609,5 +607,5 @@ HRESULT create_text_services( IUnknown *outer, ITextHost *text_host, IUnknown **
|
||||
*/
|
||||
HRESULT WINAPI CreateTextServices( IUnknown *outer, ITextHost *text_host, IUnknown **unk )
|
||||
{
|
||||
return create_text_services( outer, text_host, unk, FALSE, NULL );
|
||||
return create_text_services( outer, text_host, unk, FALSE );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user