mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-14 21:55:28 +00:00
msctf: Implement ITfDocumentMgr::Push.
This commit is contained in:
parent
b712f39b66
commit
fd8c2a18cf
|
@ -43,11 +43,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctf);
|
||||||
typedef struct tagDocumentMgr {
|
typedef struct tagDocumentMgr {
|
||||||
const ITfDocumentMgrVtbl *DocumentMgrVtbl;
|
const ITfDocumentMgrVtbl *DocumentMgrVtbl;
|
||||||
LONG refCount;
|
LONG refCount;
|
||||||
|
|
||||||
|
ITfContext* contextStack[2]; /* limit of 2 contexts */
|
||||||
} DocumentMgr;
|
} DocumentMgr;
|
||||||
|
|
||||||
static void DocumentMgr_Destructor(DocumentMgr *This)
|
static void DocumentMgr_Destructor(DocumentMgr *This)
|
||||||
{
|
{
|
||||||
TRACE("destroying %p\n", This);
|
TRACE("destroying %p\n", This);
|
||||||
|
if (This->contextStack[0])
|
||||||
|
ITfContext_Release(This->contextStack[0]);
|
||||||
|
if (This->contextStack[1])
|
||||||
|
ITfContext_Release(This->contextStack[1]);
|
||||||
HeapFree(GetProcessHeap(),0,This);
|
HeapFree(GetProcessHeap(),0,This);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,8 +110,20 @@ static HRESULT WINAPI DocumentMgr_CreateContext(ITfDocumentMgr *iface,
|
||||||
static HRESULT WINAPI DocumentMgr_Push(ITfDocumentMgr *iface, ITfContext *pic)
|
static HRESULT WINAPI DocumentMgr_Push(ITfDocumentMgr *iface, ITfContext *pic)
|
||||||
{
|
{
|
||||||
DocumentMgr *This = (DocumentMgr *)iface;
|
DocumentMgr *This = (DocumentMgr *)iface;
|
||||||
FIXME("STUB:(%p)\n",This);
|
ITfContext *check;
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("(%p) %p\n",This,pic);
|
||||||
|
|
||||||
|
if (This->contextStack[1]) /* FUll */
|
||||||
|
return TF_E_STACKFULL;
|
||||||
|
|
||||||
|
if (!pic || FAILED(IUnknown_QueryInterface(pic,&IID_ITfContext,(LPVOID*) &check)))
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
This->contextStack[1] = This->contextStack[0];
|
||||||
|
This->contextStack[0] = check;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI DocumentMgr_Pop(ITfDocumentMgr *iface, DWORD dwFlags)
|
static HRESULT WINAPI DocumentMgr_Pop(ITfDocumentMgr *iface, DWORD dwFlags)
|
||||||
|
|
|
@ -23,6 +23,7 @@ import "textstor.idl";
|
||||||
/* import "ctfutb.idl"; */
|
/* import "ctfutb.idl"; */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
cpp_quote("#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)")
|
||||||
cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
|
cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
|
||||||
|
|
||||||
typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)] DWORD TfEditCookie;
|
typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)] DWORD TfEditCookie;
|
||||||
|
|
Loading…
Reference in a new issue