msctf: Implement ITfKeystrokeMgr::IsPreservedKey.
This commit is contained in:
parent
a2c7a99471
commit
32828799ac
|
@ -420,14 +420,14 @@ static void test_KeystrokeMgr(void)
|
||||||
preserved = FALSE;
|
preserved = FALSE;
|
||||||
hr = ITfKeystrokeMgr_IsPreservedKey(keymgr, &CLSID_PreservedKey, &tfpk, &preserved);
|
hr = ITfKeystrokeMgr_IsPreservedKey(keymgr, &CLSID_PreservedKey, &tfpk, &preserved);
|
||||||
todo_wine ok(hr == S_OK, "ITfKeystrokeMgr_IsPreservedKey failed\n");
|
todo_wine ok(hr == S_OK, "ITfKeystrokeMgr_IsPreservedKey failed\n");
|
||||||
if (hr == S_OK) todo_wine ok(preserved == TRUE,"misreporting preserved key\n");
|
if (hr == S_OK) ok(preserved == TRUE,"misreporting preserved key\n");
|
||||||
|
|
||||||
hr = ITfKeystrokeMgr_UnpreserveKey(keymgr, &CLSID_PreservedKey,&tfpk);
|
hr = ITfKeystrokeMgr_UnpreserveKey(keymgr, &CLSID_PreservedKey,&tfpk);
|
||||||
todo_wine ok(SUCCEEDED(hr),"ITfKeystrokeMgr_UnpreserveKey failed\n");
|
todo_wine ok(SUCCEEDED(hr),"ITfKeystrokeMgr_UnpreserveKey failed\n");
|
||||||
|
|
||||||
hr = ITfKeystrokeMgr_IsPreservedKey(keymgr, &CLSID_PreservedKey, &tfpk, &preserved);
|
hr = ITfKeystrokeMgr_IsPreservedKey(keymgr, &CLSID_PreservedKey, &tfpk, &preserved);
|
||||||
todo_wine ok(hr == S_FALSE, "ITfKeystrokeMgr_IsPreservedKey failed\n");
|
ok(hr == S_FALSE, "ITfKeystrokeMgr_IsPreservedKey failed\n");
|
||||||
if (hr == S_FALSE) todo_wine ok(preserved == FALSE,"misreporting preserved key\n");
|
if (hr == S_FALSE) ok(preserved == FALSE,"misreporting preserved key\n");
|
||||||
|
|
||||||
hr = ITfKeystrokeMgr_UnpreserveKey(keymgr, &CLSID_PreservedKey,&tfpk);
|
hr = ITfKeystrokeMgr_UnpreserveKey(keymgr, &CLSID_PreservedKey,&tfpk);
|
||||||
ok(hr==CONNECT_E_NOCONNECTION,"ITfKeystrokeMgr_UnpreserveKey inproperly succeeded\n");
|
ok(hr==CONNECT_E_NOCONNECTION,"ITfKeystrokeMgr_UnpreserveKey inproperly succeeded\n");
|
||||||
|
|
|
@ -547,8 +547,25 @@ static HRESULT WINAPI KeystrokeMgr_IsPreservedKey(ITfKeystrokeMgr *iface,
|
||||||
REFGUID rguid, const TF_PRESERVEDKEY *pprekey, BOOL *pfRegistered)
|
REFGUID rguid, const TF_PRESERVEDKEY *pprekey, BOOL *pfRegistered)
|
||||||
{
|
{
|
||||||
ThreadMgr *This = impl_from_ITfKeystrokeMgrVtbl(iface);
|
ThreadMgr *This = impl_from_ITfKeystrokeMgrVtbl(iface);
|
||||||
FIXME("STUB:(%p)\n",This);
|
struct list *cursor;
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("(%p) %s (%x %x) %p\n",This,debugstr_guid(rguid), (pprekey)?pprekey->uVKey:0, (pprekey)?pprekey->uModifiers:0, pfRegistered);
|
||||||
|
|
||||||
|
if (!rguid || !pprekey || !pfRegistered)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
LIST_FOR_EACH(cursor, &This->CurrentPreservedKeys)
|
||||||
|
{
|
||||||
|
PreservedKey* key = LIST_ENTRY(cursor,PreservedKey,entry);
|
||||||
|
if (IsEqualGUID(rguid,&key->guid) && pprekey->uVKey == key->prekey.uVKey && pprekey->uModifiers == key->prekey.uModifiers)
|
||||||
|
{
|
||||||
|
*pfRegistered = TRUE;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*pfRegistered = FALSE;
|
||||||
|
return S_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI KeystrokeMgr_PreserveKey(ITfKeystrokeMgr *iface,
|
static HRESULT WINAPI KeystrokeMgr_PreserveKey(ITfKeystrokeMgr *iface,
|
||||||
|
|
Loading…
Reference in New Issue