mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 01:43:37 +00:00
msctf: Beginning implementation of ITfContext::GetStart.
This commit is contained in:
parent
a9c998ae90
commit
6772a07a94
|
@ -299,8 +299,22 @@ static HRESULT WINAPI Context_GetStart (ITfContext *iface,
|
|||
TfEditCookie ec, ITfRange **ppStart)
|
||||
{
|
||||
Context *This = (Context *)iface;
|
||||
FIXME("STUB:(%p)\n",This);
|
||||
return E_NOTIMPL;
|
||||
EditCookie *cookie;
|
||||
TRACE("(%p) %i %p\n",This,ec,ppStart);
|
||||
|
||||
if (!ppStart)
|
||||
return E_INVALIDARG;
|
||||
|
||||
*ppStart = NULL;
|
||||
|
||||
if (!This->connected)
|
||||
return TF_E_DISCONNECTED;
|
||||
|
||||
if (get_Cookie_magic(ec)!=COOKIE_MAGIC_EDITCOOKIE)
|
||||
return TF_E_NOLOCK;
|
||||
|
||||
cookie = get_Cookie_data(ec);
|
||||
return Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, 0, 0, ppStart);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI Context_GetEnd (ITfContext *iface,
|
||||
|
|
|
@ -1373,9 +1373,33 @@ static ULONG WINAPI EditSession_Release(ITfEditSession *iface)
|
|||
static HRESULT WINAPI EditSession_DoEditSession(ITfEditSession *iface,
|
||||
TfEditCookie ec)
|
||||
{
|
||||
ITfContext *cxt;
|
||||
ITfDocumentMgr *dm;
|
||||
ITfRange *range;
|
||||
HRESULT hr;
|
||||
|
||||
ok(test_DoEditSession == SINK_EXPECTED, "Unexpected DoEditSession\n");
|
||||
ok(test_ACP_RequestLock == SINK_FIRED,"Expected RequestLock not fired\n");
|
||||
test_DoEditSession = SINK_FIRED;
|
||||
|
||||
ITfThreadMgr_GetFocus(g_tm, &dm);
|
||||
ITfDocumentMgr_GetTop(dm,&cxt);
|
||||
|
||||
hr = ITfContext_GetStart(cxt,ec,NULL);
|
||||
ok(hr == E_INVALIDARG,"Unexpected return code %x\n",hr);
|
||||
|
||||
range = (ITfRange*)0xdeaddead;
|
||||
hr = ITfContext_GetStart(cxt,0xdeadcafe,&range);
|
||||
ok(hr == TF_E_NOLOCK,"Unexpected return code %x\n",hr);
|
||||
ok(range == NULL,"Range not set to NULL\n");
|
||||
|
||||
hr = ITfContext_GetStart(cxt,ec,&range);
|
||||
ok(SUCCEEDED(hr),"Unexpected return code %x\n",hr);
|
||||
ok(range != NULL,"Range set to NULL\n");
|
||||
|
||||
ITfRange_Release(range);
|
||||
ITfContext_Release(cxt);
|
||||
ITfDocumentMgr_Release(dm);
|
||||
return 0xdeadcafe;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,10 @@ import "textstor.idl";
|
|||
cpp_quote("#include <winuser.h>")
|
||||
|
||||
cpp_quote("#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)")
|
||||
cpp_quote("#define TF_E_DISCONNECTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0504)")
|
||||
cpp_quote("#define TF_E_ALREADY_EXISTS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0506)")
|
||||
cpp_quote("#define TF_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)")
|
||||
|
||||
cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
|
||||
cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
|
||||
cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
|
||||
|
|
Loading…
Reference in a new issue